package com.chengxiaoxiao.ai_demo.service;

import com.chengxiaoxiao.ai_demo.entity.KnowledgeFile;
import com.chengxiaoxiao.ai_demo.vo.vo.KnowledgeSearchVo;

import java.util.List;

/**
 * 文件嵌入 服务类
 *
 * @Description:
 * @Author: Cheng Xiaoxiao
 * @Date: 2025-03-17 15:06:36
 */
public interface DocumentEmbeddingService {
    /**
     * 嵌入知识库文件
     *
     * @param knowledgeBaseId 知识库ID
     * @param knowledgeFiles  知识库文件
     */
    void embeddingDocument(String knowledgeBaseId, List<KnowledgeFile> knowledgeFiles);

    /**
     * 根据知识库ID和关键词搜索
     *
     * @param id  知识库ID
     * @param key 关键词
     * @return 搜索结果
     */
    List<KnowledgeSearchVo> search(String id, String key);

    /**
     * 根据知识库ID删除
     *
     * @param knowledgeBaseId 知识库ID
     */
    void deleteByKnowledgeBaseId(String knowledgeBaseId);
}